import webapp2
import core.crawl
import data.provider

class MainPage(webapp2.RequestHandler):
    def get(self):
        dic = data.provider.Providers().getProviderList()
        socialCrawler = core.crawl.CrawlProducts()
        for provider, value in dic.items():
            socialCrawler
            count = socialCrawler.crawlSocialProducts(provider, value[1], value[0])
            self.response.out.write(provider)
            self.response.out.write(count)
            self.response.out.write("<br>")

app = webapp2.WSGIApplication([('/crawler', MainPage)], debug=True)